﻿@{
    ViewBag.Title = "ArticleManager";
}
@using Course
@using Course.Models
<html>
<head>
    <title>后台</title>
</head>
<body>
    <div id="body-wrapper">
        @RenderPage("../Shared/BackLeft.cshtml")
        <div id="main-content">
            <!-- Main Content Section with everything -->
            <noscript>
                <!-- Show a notification if the user has disabled javascript -->
                <div class="notification error png_bg">
                    <div>
                        Javascript is disabled or is not supported by your browser. Please <a href="http://browsehappy.com/"
                            title="Upgrade to a better browser">upgrade</a> your browser or <a href="http://www.google.com/support/bin/answer.py?answer=23852"
                                title="Enable Javascript in your browser">enable</a> Javascript to navigate
                        the interface properly. Download From <a href="http://www.exet.tk">exet.tk</a></div>
                </div>
            </noscript>
            <ul class="shortcut-buttons-set">
                <li><a class="shortcut-button" href="ArticleAdd"><span>
                    <img src="@Url.Content("~/Content/Images/icons/paper_content_pencil_48.png")" alt="icon" /><br />
                    添加文章 </span></a></li>
            </ul>
            <div class="clear">
            </div>
            <!-- End .clear -->
            <div class="content-box">
                <!-- Start Content Box -->
                <div class="content-box-header">
                    <h3>
                        文章</h3>
                    @*  <ul class="content-box-tabs">
                        <li><a href="#tab1" class="default-tab">分类</a></li>
                        <!-- href must be unique and match the id of target div -->
                        <li><a href="#tab2">Forms</a></li>
                    </ul>*@
                    <div class="clear">
                    </div>
                </div>
                <!-- End .content-box-header -->
                <div class="content-box-content">
                    <div class="tab-content default-tab" id="tab1">
                        <!-- This is the target div. id must match the href of this div's tab -->
                        <div class="notification attention png_bg">
                            <a href="#" class="close">
                                <img src="@Url.Content("~/Content/Images/icons/cross_grey_small.png")" title="Close this notification" alt="close" /></a>
                            <div>
                                请注意修改下面内容
                            </div>
                        </div>
                        <table>
                            <thead>
                                <tr>
                                    <th>
                                        标题
                                    </th>
                                    <th>
                                        作者
                                    </th>
                                    <th>
                                        时间
                                    </th>
                                    <th>
                                        分类
                                    </th>
                                    <th>
                                        排序
                                    </th>
                                    <th>
                                        操作
                                    </th>
                                </tr>
                            </thead>
                            <tfoot>
                                @{
                                    IPagedList<Article> all = ViewData["all"] as IPagedList<Article>;
                                }
                            </tfoot>
                            <tbody>
                                @{
                                    foreach (var article in all)
                                    {
                                    <tr>
                                        <td>
                                            @article.ATitle
                                        </td>
                                        <td>@article.Author
                                        </td>
                                        <td>@article.Atime
                                        </td>
                                        <td>@article.Category.CName
                                        </td>
                                        <td>@article.OrderNum
                                        </td>
                                        <td>
                                            <a href="ArticleEdit/@article.ArticleID" title="修改">
                                                <img src="@Url.Content("~/Content/Images/icons/pencil.png")" alt="Edit" /></a>
                                            <a href="ArticleDelete/@article.ArticleID" title="删除">
                                                <img src="@Url.Content("~/Content/Images/icons/cross.png")" alt="Delete" /></a>
                                        </td>
                                    </tr>
                                    }
                                }
                            </tbody>
                        </table>
                        @Html.Raw(Html.PagerBar(all, BarStyle.viciao))
                    </div>
                    <!-- End #tab1 -->
                </div>
                <!-- End .content-box-content -->
            </div>
            <!-- End .content-box -->
        </div>
    </div>
</body>
</html>
